package com.atguigu.java.ai.langchain4j.config;

import dev.langchain4j.memory.ChatMemory;
import dev.langchain4j.memory.chat.MessageWindowChatMemory;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @Author:Simple
 * @Date: 2025/8/29 18:49
 * @Description:
 **/
@Configuration
public class ChatMemoryConfig {
    @Bean
    public ChatMemory chatMemory(){
        return  MessageWindowChatMemory.withMaxMessages(10);
    }
}
